package com.cswangdao.controller.user;

import com.cswangdao.domain.vo.WXHomeIndexVo;
import com.cswangdao.result.Result;
import com.cswangdao.service.GoodsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/wx/home")
@Slf4j
public class WxHomeController {

    @Autowired
    private GoodsService goodsService;

    @GetMapping("/index")
    public Result<WXHomeIndexVo> index(){
        log.info("获取首页信息");
        WXHomeIndexVo wxIndexVo = goodsService.index();
        return Result.success(wxIndexVo);
    }



}
